//  this library.
/// 视频信息
class VideoInfoModel {
  String? createdTime;
  String? modifyTime;
  String? createdBy;
  String? modifyBy;
  String? id;
  String? name;
  String? aliyunVideoId;

  /// 总时长
  int? duration;
  int? categoryId;
  String? serverName;
  int? sort;
  String? coverImg;
  String? teacherId;
  String? categoryName;
  String? chapterName;
  String? chapterId;

  /// 观看时长 毫秒
  int? watchDuration;

  /// 是否完结
  bool? fs;

  VideoInfoModel({
    this.createdTime,
    this.modifyTime,
    this.createdBy,
    this.modifyBy,
    this.id,
    this.name,
    this.aliyunVideoId,
    this.duration,
    this.categoryId,
    this.serverName,
    this.sort,
    this.coverImg,
    this.teacherId,
    this.categoryName,
    this.chapterName,
    this.chapterId,
    this.watchDuration,
    this.fs,
  });

  VideoInfoModel.fromJson(Map<String, dynamic> json) {
    createdTime = json['createdTime'];
    modifyTime = json['modifyTime'];
    createdBy = json['createdBy'];
    modifyBy = json['modifyBy'];
    id = json['id'];
    name = json['name'];
    aliyunVideoId = json['aliyunVideoId'];
    duration = json['duration'];
    categoryId = json['categoryId'];
    serverName = json['serverName'];
    sort = json['sort'];
    coverImg = json['coverImg'];
    teacherId = json['teacherId'];
    categoryName = json['categoryName'];
    chapterName = json['chapterName'];
    chapterId = json['chapterId'];
    watchDuration = json['watchDuration'];
    fs = json['fs'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['createdTime'] = createdTime;
    data['modifyTime'] = modifyTime;
    data['createdBy'] = createdBy;
    data['modifyBy'] = modifyBy;
    data['id'] = id;
    data['name'] = name;
    data['aliyunVideoId'] = aliyunVideoId;
    data['duration'] = duration;
    data['categoryId'] = categoryId;
    data['serverName'] = serverName;
    data['sort'] = sort;
    data['coverImg'] = coverImg;
    data['teacherId'] = teacherId;
    data['categoryName'] = categoryName;
    data['chapterName'] = chapterName;
    data['chapterId'] = chapterId;
    data['watchDuration'] = watchDuration;
    data['fs'] = fs;
    return data;
  }
}
